{% extends 'TopxiaWebBundle::layout.html.twig' %}
{% set script_controller = 'auth/login-bind-exist' %}
{% block content %}
<div class="row row-6">
  <div class="col-md-6 col-md-offset-3">
    <div class="panel panel-default panel-page">
      <div class="panel-heading"><h2>绑定到已有帐号</h2></div>
      <form id="bind-exist-form" class="form-vertical" method="post" action="{{ path('login_bind_existbind') }}" data-goto="{% if hasPartnerAuth %}{{ path('partner_login') }}{% else %}{{ path('homepage') }}{% endif %}">

        <div class="alert alert-danger" id="bind-exist-form-error" style="display:none;"></div>
        <div class="form-group">
          <label class="control-label" for="bind-email-field">Email / 手机</label>
          <div class="controls">
            <input id="bind-email-field" class="form-control" type="text" name="emailOrMobile">
            <p class="help-block">请填写在{{ setting('site.name') }}注册时填写的Email地址/手机号码</p>
          </div>
        </div>
        <div class="form-group">
          <label class="control-label" for="bind-password-field">密码</label>
          <div class="controls">
            <input id="bind-password-field" class="form-control" type="password" name="password">
          </div>
        </div>

        <div class="form-group">
          <div class="controls">
            <button class="btn btn-fat btn-default btn-lg" type="submit" data-loading-text="正在提交...">绑定</button>
            <a href="{{path('homepage')}}" class="btn btn-fat btn-link btn-default btn-lg pull-right">返回</a>
          </div>
        </div>

        <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
      </form>
    </div>
  </div>
</div>
{% endblock %}